package asteroids.model.programs.parsing.expressions;


public abstract class EqualityExpression extends BinaryExpression{

	protected EqualityExpression(E e1, E e2) {
		super(e1, e2);
		if(!canHaveAsEqualityExpression(e1, e2)){
		setExpression(null, null);
		}
	}
public boolean canHaveAsEqualityExpression(E e1, E e2){
	return !((e1.isNull() &&(e2.isDouble() || e2.isBoolean())) || (e2.isNull() &&(e1.isDouble() || e1.isBoolean())));
			}
public boolean isBoolean(){
	return true;
}
public boolean isDouble(){
	return false;
}
public boolean isEntity(){
	return false;
}
public boolean isString(){
	return false;
}
}
